import request from '@/utils/request'

export default{
  // 条件查询分页查询
  getTeacherList(current,limit,teacherQuery){
      return request({
          url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
          method: 'post',
          // teacherQuerry条件对象，后端使用RequsetBody解析
          data: teacherQuery
        })
  },
  // 删除教师ID
  removeDataById(id){
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete',
    })
  },
  // 添加讲师
  addTeacher(teacher){
    return request({
      url:`/eduservice/teacher/addTeacher`,
      method:'post',
      data:teacher
    })
  },
  // 查询讲师
  teacherById(id){
    return request({
      url:`/eduservice/teacher/findTeacherById/${id}`,
      method:'get'
    })
  },
  // 修改讲师
  updateTeacher(teacher){
    return request({
      url:`/eduservice/teacher/updateTeacher`,
      method:'post',
      data:teacher
    })
  }
}